package com.generate.control;

import javax.swing.JComboBox;
import javax.swing.plaf.multi.MultiComboBoxUI;

public class JComboboxReplace extends JComboBox<String> implements IReplace {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	String findText;
	public JComboboxReplace() {
		super();
		IReplace.lstReplaceComponent.add(this);
		setUI(MultiComboBoxUI.createUI(this));
	}
	@Override
	public void setFindText(String findText) {
		this.findText = findText;
	}

	@Override
	public String getFindText() {
		return this.findText;
	}

	@Override
	public String getReplaceText() {
		return getSelectedItem().toString();
	}
	@Override
	public void setReplaceText(String replaceText) {
		setSelectedItem(replaceText);
	}
}
